
*set working directory 

set more off

cd"/Users/swang/Dropbox/Replication"

***************
* Figure S.1                            
***************


use womenprepost,clear

graph twoway (line majoritarian_women year, lcolor(gs8) lw(vthick)) ///
  (line PR_women year, lcolor(gs0) lw(vthick) lpattern(dash)), yscale(range(10 55)) ylab(10.00 "10" 20.00 "20" 30.00 "30" 40.00 "40" 50.00 "50" 60.00 "60") ///
legend(size(medium) region(color(white))  ) ///
 ysca(titlegap(2)) ///
xtitle("") ytitle("Proportion %", size(medium)) ///
xlabel(2005 2006 2007 2008 2009 2010, labsize(medium) noticks) ylabel(, labsize(medium)) xsca(titlegap(2)) xsize(6) scheme(plottig) ///
legend(order(1 "Non-quota tier" 2 "Quota tier") pos(5) ring(0) col(1))





***************
* Table S.5                            
***************


use ReplicationdataDoWomenRepresentWomenPOBE.dta,clear

tabstat Propose_wel_main Propose_hea_main Propose_edu_main ///
percentage_wel_main percentage_hea_main percentage_edu_main ///
Female PR Post ///
Education Welfare PhD Seniority Majority Age ///
Indigenous MD z2AverageHHIncome Rural Nonpartisan KMT DPP PFP OtherParties  ///
Capital SpecialMulnicipalities OtherLargeCities Counties, stat(mean sd min max n)



***************
* Table S.7                            
***************



gen PRxPost=PR*Post
gen PRxFemale=PR*Female
gen PostxFemale=Post*Female
gen PRxPostxFemale = PR*Post*Female


eststo clear

eststo: reg percentage_wel_main PR Post PRxPost i.Year i.District, cluster(id) robust 
eststo: reg percentage_hea_main PR Post PRxPost i.Year i.District, cluster(id) robust 
eststo: reg percentage_edu_main PR Post PRxPost i.Year i.District, cluster(id) robust 

eststo: reg percentage_wel_main PR Post Female PRxPost i.Pid WelfareHealth Education Majority Seniority Age Indigenous PhD MD z2AverageHHIncome Rural i.AdminDivision i.Year i.District, cluster(id) robust
eststo: reg percentage_hea_main PR Post Female PRxPost i.Pid WelfareHealth Education Majority Seniority Age Indigenous PhD MD z2AverageHHIncome Rural i.AdminDivision i.Year i.District, cluster(id) robust 
eststo: reg percentage_edu_main PR Post Female PRxPost i.Pid WelfareHealth Education Majority Seniority Age Indigenous PhD MD z2AverageHHIncome Rural i.AdminDivision i.Year i.District, cluster(id) robust 


esttab using TableS7.tex, replace ///
       nobaselevels compress modelwidth(6) keep(PR Post PRxPost) ///
       stats(N, fmt(%9.0g) labels("Observations")) booktabs ///
       title(Difference-in-Differences Analysis: Effect of Quotas on the Sponsorship Rate of Welfare, Health, and Education Bills (Comparing between Tiers)) b(3) se(3) ///
       indicate("Individual controls = *.Pid WelfareHealth* Education* Majority* Seniority* Age* Indigenous* PhD* MD*" ///
	   "District controls = z2AverageHHIncome* Rural* *.AdminDivision" "District dummies = *.District" "Year dummies = *.Year") ///
       star(+ 0.10 * 0.05 ** 0.01 *** 0.001) mtitles(Welfare Health Education Welfare Health Education) ///
       label eqlabels(none) varlabels(PR "Quota tier" Post "Post" PRxPost "Post $\times$ Quota tier" )



***************
* Table S.8                            
***************

logit Propose_wel_main i.Type##i.Post i.Pid WelfareHealth Education Majority Seniority Age Indigenous PhD MD z2AverageHHIncome Rural i.AdminDivision i.Year i.District, cluster(id) robust 
est store LogitA1

logit Propose_hea_main i.Type##i.Post i.Pid WelfareHealth Education Majority Seniority Age Indigenous PhD MD z2AverageHHIncome Rural i.AdminDivision i.Year i.District, cluster(id) robust
est store LogitB1

logit Propose_edu_main i.Type##i.Post i.Pid WelfareHealth Education Majority Seniority Age Indigenous PhD MD z2AverageHHIncome Rural i.AdminDivision i.Year i.District, cluster(id) robust
est store LogitC1


esttab LogitA1 LogitB1 LogitC1 using TableS8.tex, replace ///
       nogaps noconstant nobaselevels compress booktabs nomtitles interaction(" $\times$ ") ///
	   mgroups("Welfare" "Health" "Education", pattern(1 0 1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}) ) ///
       stats(aic bic chi2 N, fmt(%9.0f) labels("AIC" "BIC" "Chi-squared" "Observations")) ///
	   indicate( ///
	   "District dummies = *.District" "Year dummies = *.Year") ///
       title(Logistic Regressions of Proposing Welfare, Health and Education Issues) b(3) se(3)  ///
       star(+ 0.10 * 0.05 ** 0.01 *** 0.001) ///
       eqlabels(none) label varlabels(Majority "Majority party" Education "Education committee" ///
	   WelfareHealth "Welfare and health committee" Seniority "Seniority" z2AverageHHIncome "Avg. household income" ///
	   Rural "Rural index")  
	  
	  

***************
* Figure S.2                            
***************




logit Propose_wel_main i.Type##i.Post, cluster(id) robust 
est store LogitA2
margins Type, dydx(Post) post
est store LogitAM

logit Propose_hea_main i.Type##i.Post, cluster(id) robust 
est store LogitB2
margins Type, dydx(Post) post
est store LogitBM

logit Propose_edu_main i.Type##i.Post, cluster(id) robust 
est store LogitC2
margins Type, dydx(Post) post
est store LogitCM


coefplot LogitAM, bylabel(Welfare Bills) ///
|| LogitBM, bylabel(Health Bills) ///
|| LogitCM, bylabel(Education Bills) ||, mcolor(black) ciopts(lcolor(black black)) ///
scheme(plottig) level(95 90) byopts(row(1)) yscale(noline alt) keep(*Type) xline(0, lw(medthick) lcolor(black)) msymbol(O)



***************
* Table S.9                            
***************

   
eststo clear

eststo: reg percentage_wel_main PR Post PRxPost i.Year i.District, cluster(id) robust 
eststo: reg percentage_hea_main PR Post PRxPost i.Year i.District, cluster(id) robust 
eststo: reg percentage_edu_main PR Post PRxPost i.Year i.District, cluster(id) robust 

eststo: reg percentage_wel_main PR Post Female PRxPost i.Pid WelfareHealth Education Majority Seniority Age Indigenous PhD MD z2AverageHHIncome Rural i.AdminDivision i.Year i.District, cluster(id) robust
eststo: reg percentage_hea_main PR Post Female PRxPost i.Pid WelfareHealth Education Majority Seniority Age Indigenous PhD MD z2AverageHHIncome Rural i.AdminDivision i.Year i.District, cluster(id) robust 
eststo: reg percentage_edu_main PR Post Female PRxPost i.Pid WelfareHealth Education Majority Seniority Age Indigenous PhD MD z2AverageHHIncome Rural i.AdminDivision i.Year i.District, cluster(id) robust 


esttab using TableS9.tex, replace noconstant ///
       nobaselevels compress modelwidth(6) ///
       stats(N, fmt(%9.0g) labels("Observations")) booktabs ///
       title(Difference-in-Differences Analysis: Effect of Quotas on the Sponsorship of Welfare, Health, and Education Bills (Comparing between Tiers)) b(3) se(3) ///
       indicate("District dummies = *.District" "Year dummies = *.Year") ///
       star(+ 0.10 * 0.05 ** 0.01 *** 0.001) mtitles(Welfare Health Education Welfare Health Education) ///
       label eqlabels(none)  varlabels(Majority "Majority party" Education "Education committee" ///
	   WelfareHealth "Welfare and health committee" Seniority "Seniority" z2AverageHHIncome "Avg. household income" ///
	   Rural "Rural index" Female "Female" PR "Quota tier" Post "Post" PRxPost "Post $\times$ Quota tier" )  
	   

***************
* Table S.10                            
***************

	   
	   
eststo clear

eststo: reg percentage_wel_main PR Post Female PRxPost  PRxFemale  PostxFemale PRxPostxFemale i.Year i.District, cluster(id) robust 
eststo: reg percentage_hea_main PR Post Female PRxPost  PRxFemale  PostxFemale PRxPostxFemale i.Year i.District, cluster(id) robust 
eststo: reg percentage_edu_main PR Post Female PRxPost  PRxFemale  PostxFemale PRxPostxFemale i.Year i.District, cluster(id) robust 

eststo: reg percentage_wel_main PR Post Female PRxPost  PRxFemale  PostxFemale PRxPostxFemale i.Pid WelfareHealth Education Majority Seniority Age Indigenous PhD MD z2AverageHHIncome Rural i.AdminDivision i.Year i.District, cluster(id) robust 
eststo: reg percentage_hea_main PR Post Female PRxPost  PRxFemale  PostxFemale PRxPostxFemale i.Pid WelfareHealth Education Majority Seniority Age Indigenous PhD MD z2AverageHHIncome Rural i.AdminDivision i.Year i.District, cluster(id) robust 
eststo: reg percentage_edu_main PR Post Female PRxPost  PRxFemale  PostxFemale PRxPostxFemale i.Pid WelfareHealth Education Majority Seniority Age Indigenous PhD MD z2AverageHHIncome Rural i.AdminDivision i.Year i.District, cluster(id) robust 


esttab using TableS10.tex, replace ///
       nobaselevels compress modelwidth(6) noconstant ///
       stats(N, fmt(%9.0g) labels("Observations")) booktabs ///
       title(Extended Difference-in-Differences Analysis: Effect of Quotas (Comparing between Tiers and Gender)) b(3) se(3) ///
            indicate("District dummies = *.District" "Year dummies = *.Year") ///
       star(+ 0.10 * 0.05 ** 0.01 *** 0.001) mtitles(Welfare Health Education Welfare Health Education) ///
       label eqlabels(none) varlabels(PRxPost "Quota tier $\times$ Post" PostxFemale "Post $\times$ Female" PRxPostxFemale "Quota tier $\times$ Post $\times$ Female" Majority "Majority party" Education "Education committee" ///
	   WelfareHealth "Welfare and health committee" Seniority "Seniority" z2AverageHHIncome "Avg. household income" ///
	   Rural "Rural index" Female "Female" PR "Quota tier" Post "Post" PRxPost "Post $\times$ Quota tier")





***************
* Table S.11                            
***************



eststo clear

eststo: reg percentage_wel_co PR Post Female PRxPost  PRxFemale  PostxFemale PRxPostxFemale i.Year i.District, cluster(id) robust 
est store DID1 
eststo: reg percentage_hea_co PR Post Female PRxPost  PRxFemale  PostxFemale PRxPostxFemale i.Year i.District, cluster(id) robust 
est store DID2
eststo: reg percentage_edu_co PR Post Female PRxPost  PRxFemale  PostxFemale PRxPostxFemale i.Year i.District, cluster(id) robust 
est store DID3

eststo: reg percentage_wel_co PR Post Female PRxPost  PRxFemale  PostxFemale PRxPostxFemale i.Pid WelfareHealth Education Majority Seniority Age Indigenous PhD MD z2AverageHHIncome Rural i.AdminDivision i.Year i.District, cluster(id) robust 
eststo: reg percentage_hea_co PR Post Female PRxPost  PRxFemale  PostxFemale PRxPostxFemale i.Pid WelfareHealth Education Majority Seniority Age Indigenous PhD MD z2AverageHHIncome Rural i.AdminDivision i.Year i.District, cluster(id) robust 
eststo: reg percentage_edu_co PR Post Female PRxPost  PRxFemale  PostxFemale PRxPostxFemale i.Pid WelfareHealth Education Majority Seniority Age Indigenous PhD MD z2AverageHHIncome Rural i.AdminDivision i.Year i.District, cluster(id) robust 


esttab using TableS11.tex, replace ///
       nobaselevels compress modelwidth(6) keep(PRxPost PostxFemale PRxPostxFemale) ///
       stats(N, fmt(%9.0g) labels("Observations")) booktabs ///
       title(Extended Difference-in-Differences Analysis: Effect of Quotas (Comparing between Tiers and Gender)) b(3) se(3) ///
       indicate("Individual characteristics controls = *.Pid WelfareHealth* Education* Majority* Seniority* Age* Indigenous* PhD* MD*" ///
	   "District characteristics controls = z2AverageHHIncome* Rural* *.AdminDivision" "District dummies = *.District" "Year dummies = *.Year") ///
       star(+ 0.10 * 0.05 ** 0.01 *** 0.001) mtitles(Welfare Health Education Welfare Health Education) ///
       label eqlabels(none) varlabels(PRxPost "Quota tier $\times$ Post" PostxFemale "Post $\times$ Female" PRxPostxFemale "Quota tier $\times$ Post $\times$ Female")


***************
* Figure S.3                            
***************



coefplot ///
(DID1), bylabel(Welfare) || ///
(DID2), bylabel(Health) || ///
(DID3), bylabel(Education) ||, ///
scheme(plottig) level(95 90) msymbol(O) byopts(cols(1) legend(off)) ///
coeflabels(PRxPostxFemale = "Mandate effect" PostxFemale = "Gender effect" PRxPost = "Spillover effect") ///
mcolor(black) ciopts(lcolor(black black)) ///
ylabel(, notick labsize(msmall)) xline(0, lw(medthick) lcolor(black)) keep(PRxPostxFemale PRxPost PostxFemale) ///
order(PRxPostxFemale PostxFemale PRxPost)



